{include file="public/header" /}

<div class="page">
    <form id="user_form" enctype="multipart/form-data" method="post" >

        <table class="sc-default-table">
            <tbody>

            <input type="hidden" name="rc_id" id="rc_id" value="{$rc_id}">

            <tr class="noborder">

                选择对应的会员:

                {sctaglib:dcselect
                    list="[$Request.param.member_name=>$Request.param.member_name]"
                    class="w-100 sc-select-filter form-control"
                    name="member_id"
                    default="-- --"
                    url=":url('dictionary/query',['dict_type'=>'member_name_id'])"
                /}
            </tr>

            </tbody>

            <tfoot>
            <tr class="tfoot">
                <td colspan="15"><a href="JavaScript:void(0);" class="btn" id="submitBtn"><span>{$Think.lang.sc_save}</span></a></td>
            </tr>
            </tfoot>
        </table>
    </form>

    <script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js" charset="utf-8"></script>
    <script type="text/javascript">
        $(function () {

            $("#submitBtn").click(function () {
                if ($("#user_form").valid()) {
                    // $("#user_form").submit();
                    sc_ajaxpost('user_form', 'parent_reload')
                }
            });

            $('#user_form').validate({
                errorPlacement: function (error, element) {
                    error.appendTo(element.parent().parent().find('td:last'));
                },
                rules: {
                    reciver_name: {
                        required: true,
                    },
                    reciver_mobile: {
                        required: true,
                    },
                    region: {
                        checklast: true
                    },
                    reciver_street: {
                        required: true
                    },
                },
                messages: {
                    reciver_name: {
                        required: '收货人必填'
                    },
                    reciver_mobile: {
                        required: '收货人手机号必填',
                    },
                    region: {
                        checklast: '区域不完整'
                    },
                    reciver_street: {
                        required: '街道必填'
                    },
                }
            });
        });
    </script>
</div>
